#include<iostream>
#include<string>
#include<vector>
using namespace std;
int setNum = 1;
int main(){
	int T;
	
	while(cin>>T&&T!=0){
		vector<string>ss;
		string name;
		for(int i=0;i<T;i++){
			cin>>name;
			ss.push_back(name);
		}
		int left=0;
		int right=T-1;
		string arr[T];
		int tap=1;
		while(left<=right){
			if(left==right)arr[left]=ss[tap-1];
			arr[left]=ss[tap-1];
			arr[right]=ss[tap];
			left++;
			right--;
			tap=tap+2;
		}
		cout<<"set-"<<setNum++<<endl;
		for(int i=0;i<T;i++){
			cout<<arr[i]<<endl;
		}
	}
	return 0;
}